ccR.Add_Rotation(
	4,
	"Ankhys_BASIC_Restoration_Druid",
	"BASIC Rotation.\n\n Made by Ankhy."
)
function Ankhys_BASIC_Restoration_Druid()

		local Tank
		local SecondLowestHP = "player"
		local LowestHP = "player"
		for i = 1, #ccR_Friendly do
			local unit = ccR_Friendly[i]
			-- Preliminary Check on unit
			if ccR.Unit.Exists(unit)
			and ccR.Unit.Is.Alive(unit)
			and ccR.Unit.Is.APlayer(unit)
			and ccR.Unit.Distance(unit, "player") <= 44
			then
				-- Set Tank
				if ccR.Unit.Is.Tank(unit) then Tank = unit end
				-- Set Lowest and Second Lowest
				if ccR.Unit.Health(unit) < ccR.Unit.Health(LowestHP) then
					SecondLowestHP = LowestHP
					LowestHP = unit
				elseif ccR.Unit.Health(vUnit) == ccR.Unit.Health(LowestHP) then
					if UnitHealthMax(vUnit) < UnitHealthMax(LowestHP) then
						SecondLowestHP = LowestHP
						LowestHP = vUnit
					else
						SecondLowestHP = vUnit
					end
				end
			end
		end
		if not ccR.Player.HasBuff("Harmony") then Restoration.Swiftmend() end
		if IsShiftKeyDown() then 
			if ccR.Spell.IsReady("Wild Mushroom") then SpellStopCasting() ccR.Cast.Spell("Wild Mushroom") end
				CameraOrSelectOrMoveStart()
				CameraOrSelectOrMoveStop()
			return
		end
		if SpellIsTargeting() then SpellStopCasting() return true end
		if ccR.Player.HasBuff("Soul of the Forest") or ccR.Player.Mana() >= 98 then Restoration.WildGrowth(LowestHP, 90, 6) end
		if ccR.Spell.IsReady("Nature's Swiftness") then ccR.Cast.Spell("Nature's Swiftness") Restoration.Regrowth(Tank, 30) end
			Restoration.WildGrowth(LowestHP, 40, 5)
		if not ccR.Player.HasTalent("Soul of the Forest") then Restoration.WildGrowth(LowestHP, 70, 5) end
		if not ccR.Player.HasTalent("Soul of the Forest") then Restoration.WildGrowth(SecondLowestHP, 70, 5) end
		if ccR.Player.HasBuff("Clearcasting") and ccR.Player.BuffDuration("Clearcasting") > 0.8 then Restoration.Regrowth(LowestHP, 99)	end				
		if ccR.Player.Mana() >= 90 then Restoration.WildGrowth(LowestHP, 90, 3) end
		if ccR.Player.Mana() >= 90 and ccR.Player.HasTalent("Soul of the Forest") and ccR.Player.HasBuff("Soul of the Forest") then Restoration.WildGrowth(LowestHP, 95, 3) end
		if ccR.Player.HasTalent("Soul of the Forest") then Restoration.WildGrowth(LowestHP, 87, 6) end
		if ccR.Player.HasTalent("Soul of the Forest") then Restoration.WildGrowth(SecondLowestHP, 87, 6) end
			Restoration.Rejuvenation(Tank, 101, true)
		if not ccR.Player.HasBuff("Soul of the Forest") then Restoration.Germination(Tank, 90) end
		if not ccR.Player.HasTalent("Soul of the Forest") then Restoration.Rejuvenation(LowestHP, 90, true) end
		if not ccR.Player.HasTalent("Soul of the Forest") then Restoration.Rejuvenation(SecondLowestHP, 90, true) end
		if ccR.Player.HasTalent("Soul of the Forest") and not ccR.Player.HasBuff("Soul of the Forest") then Restoration.Rejuvenation("player", 85, true) end
		if not ccR.Unit.Has.MyBuff(Tank, "Life Bloom") then Restoration.AutoLifeBloom(Tank, 100, true) end
			AutoWrath()
end
